import request from '@/utils/request'; //引入request.js

//登录
export function Login(userInfo) {
    return request({
        url: '/Login',
        method: 'post',
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
        data: {
            uname: userInfo.uname,
            upassword: userInfo.upassword
        }
    });
}
//根据id获取钱包
export function Balance(uid) {
    return request({
        url: '/user/balance',
        method: 'post',
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
        data: {
            uid: uid
        }
    });
}
//钱包充值
export function Recharge(uid, num) {
    return request({
        url: '/recharge/index',
        method: 'post',
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
        data: {
            blance: num,
            uid: uid
        }
    });
}
